package joda;

import com.google.common.collect.Lists;
import org.joda.time.*;

import java.util.Date;
import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: liuliwei
 * Date: 2017-06-06
 * Time: 上午11:40
 * Description: ${description}
 */
public class JodaTimeTest {
    public static void main(String[] args) {
        LocalDate localDate=LocalDate.now();

        java.time.LocalDate localDate1= java.time.LocalDate.now();
        System.out.println(localDate);
        System.out.println(localDate1);

        Instant instant=Instant.now();
        java.time.Instant instant1= java.time.Instant.now();
        System.out.println(instant1.toEpochMilli());
        System.out.println(instant.getMillis());
        System.out.println(System.currentTimeMillis());
        System.out.println(new Date().getTime());

        LocalDate localDate2=new LocalDate(System.currentTimeMillis());
        LocalDateTime localDateTime = new LocalDateTime(System.currentTimeMillis());
        LocalTime localTime= new LocalTime(System.currentTimeMillis());
        List<Integer> integers= Lists.newArrayList(new Integer[]{1,3,4});
        System.out.println(localDate);
        System.out.println(localDateTime);
        System.out.println(localTime);

    }
}
